<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Delete extends CI_Controller {
    
    public function __construct()
    {
            parent::__construct();
            $this->load->model('cities_model');
    }    
    
    public function cities( $city_id=0 )
    {     
        $builder = new CI_TemplateBuilder();
            
        if ( $this->cities_model->delete_row( $city_id ))
        {
            $info = 'City was successfully deleted';            
        }
        else
        {
            $info = 'Error when deleting a city';            
        }                                              

        redirect('admin/show/cities/'.$info, 'location', 301);    
        
    }
        
        
    
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */